/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package seso;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name = "MITMAS", catalog = "M3BETEST", schema = "MVXJDTA")
@NamedQueries({
    @NamedQuery(name = "Mitmas.findAll", query = "SELECT m FROM Mitmas m"),
    @NamedQuery(name = "Mitmas.findByMmitno", query = "SELECT m FROM Mitmas m WHERE m.mmitno = :mmitno"),
    @NamedQuery(name = "Mitmas.findByMmitty", query = "SELECT m FROM Mitmas m WHERE m.mmitty = :mmitty"),
    @NamedQuery(name = "Mitmas.findByMmitds", query = "SELECT m FROM Mitmas m WHERE m.mmitds = :mmitds"),
    @NamedQuery(name = "Mitmas.findByMmstat", query = "SELECT m FROM Mitmas m WHERE m.mmstat = :mmstat"),
    @NamedQuery(name = "Mitmas.findByMmgrti", query = "SELECT m FROM Mitmas m WHERE m.mmgrti = :mmgrti")})
public class Mitmas implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "MMITNO")
    private String mmitno;
    @Basic(optional = false)
    @Column(name = "MMITTY")
    private String mmitty;
    @Basic(optional = false)
    @Column(name = "MMITDS")
    private String mmitds;
    @Basic(optional = false)
    @Column(name = "MMSTAT")
    private String mmstat;
    @Basic(optional = false)
    @Column(name = "MMGRTI")
    private String mmgrti;

    public Mitmas() {
    }

    public Mitmas(String mmitno) {
        this.mmitno = mmitno;
    }

    public Mitmas(String mmitno, String mmitty, String mmitds, String mmstat, String mmgrti) {
        this.mmitno = mmitno;
        this.mmitty = mmitty;
        this.mmitds = mmitds;
        this.mmstat = mmstat;
        this.mmgrti = mmgrti;
    }

    public String getMmitno() {
        return mmitno;
    }

    public void setMmitno(String mmitno) {
        String oldMmitno = this.mmitno;
        this.mmitno = mmitno;
        changeSupport.firePropertyChange("mmitno", oldMmitno, mmitno);
    }

    public String getMmitty() {
        return mmitty;
    }

    public void setMmitty(String mmitty) {
        String oldMmitty = this.mmitty;
        this.mmitty = mmitty;
        changeSupport.firePropertyChange("mmitty", oldMmitty, mmitty);
    }

    public String getMmitds() {
        return mmitds;
    }

    public void setMmitds(String mmitds) {
        String oldMmitds = this.mmitds;
        this.mmitds = mmitds;
        changeSupport.firePropertyChange("mmitds", oldMmitds, mmitds);
    }

    public String getMmstat() {
        return mmstat;
    }

    public void setMmstat(String mmstat) {
        String oldMmstat = this.mmstat;
        this.mmstat = mmstat;
        changeSupport.firePropertyChange("mmstat", oldMmstat, mmstat);
    }

    public String getMmgrti() {
        return mmgrti;
    }

    public void setMmgrti(String mmgrti) {
        String oldMmgrti = this.mmgrti;
        this.mmgrti = mmgrti;
        changeSupport.firePropertyChange("mmgrti", oldMmgrti, mmgrti);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (mmitno != null ? mmitno.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Mitmas)) {
            return false;
        }
        Mitmas other = (Mitmas) object;
        if ((this.mmitno == null && other.mmitno != null) || (this.mmitno != null && !this.mmitno.equals(other.mmitno))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "seso.Mitmas[ mmitno=" + mmitno + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
